{{ $currentNode := . }}
{{ $.Scratch.Set "currentMenuEntry" . }}


<!-- Main navigation -->
<nav class="md-nav md-nav--primary" data-md-level="0">
    <!-- Site title -->
    <label class="md-nav__title md-nav__title--site" for="drawer">
      <span class="md-nav__button md-logo">
        {{if $.Site.Params.icon}}
          <i class="md-icon">{{$.Site.Params.icon}}</i>
        {{else}}
         goo <img src="{{$.Site.Params.logo | absURL}}"  width="24" height="24" />
        {{end}}
      </span>
      {{ $.Site.Title}}
    </label>

    <!-- Repository containing source -->
    {{if $.Site.Params.repo_url}}
      <div class="md-nav__source">
          {{ partial "source" .}}
      </div>
    {{end}}
    <!-- Render item list -->
    <ul class="md-nav__list" data-md-scrollfix>

{{ range $index, $nav := $.Site.Menus.docs.ByWeight }}
    {{$.Scratch.Set "nav_level" 1}}
    {{$.Scratch.Set "nav" $nav}}
    {{$.Scratch.Set "nav_path" (printf "nav-%d" $index)}}
    {{partial "nav_item" $}}
{{end}}
    </ul>
  </nav>